<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>Mesh Place</title>
		<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'>
		
		 <!-- include CSS & JS files --> 
		 <!-- CSS file --> 
		<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" />
		<link rel="stylesheet" href="./css/works.css" /> 
		<!-- jQuery files --> 
		<script type="text/javascript" src="http://oauth.googlecode.com/svn/code/javascript/oauth.js"></script>
		<script type="text/javascript" src="http://oauth.googlecode.com/svn/code/javascript/sha1.js"></script>
		<script type="text/javascript" src="./js/jquery-1.7.1.min.js"></script>			
		<script type="text/javascript" src="./js/jquery.isotope.js"></script>
		<script type="text/javascript" src="./js/initializeMeshPlace.js"></script>
		<script type="text/javascript" src="./js/yelp-reviews.js"></script>
		<script type="text/javascript" src="./js/postMeshPlace.js"></script>
		<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
		
		<script type="text/javascript">
		$(document).ready(function() {
			var findZip = sessionStorage.getItem('zip');
			var userText = "";
			var username = sessionStorage.getItem("user");
		
			var userButtons = 	'<h2><a href="createPost.html">Create Post</a></h2>' +
	        '<h2><a href="index.html">Change Location</a></h2>' +
	        '<h2><a href="javascript:logmeout();">LogOut</a></h2>';
	        	    
	        var nonUserButtons = '<h2><a href="index.html">Change Location</a></h2>' + 
	        '<h2><a href="registration.html">Sign Up</a></h2>' +
	        '<h2><a href="login.html">Login</a></h2>';

			if (username) {
				if (username != "" && username != null) {
					var userText = "Welcome " + username + ", ";
					var appendString = '<h4>' + userText + 'Your MeshBoard Location Zip: ' + findZip + '</h4>';
					appendString += userButtons;
				}
				else {
					var appendString = '<h4>Your MeshBoard Location Zip: ' + findZip + '</h4>';
					appendString += nonUserButtons;
				}
			}
			else {
				var appendString = '<h4>Your MeshBoard Location Zip: ' + findZip + '</h4>';
				appendString += nonUserButtons;
			}
	   
			
			$('.top').append(appendString);
			initialize(true, findZip);
			// initializeYelpReviews(findZip);
			filter();

			var _gaq = _gaq || [];
			_gaq.push(['_setAccount', 'UA-35384000-1']);
			_gaq.push(['_trackPageview']);
			
			(function() {
			  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
			})();
		  
		 });
		</script>
		<script>
	    // increase the default animation speed to exaggerate the effect
	    $.fx.speeds._default = 500;
	    $(function() {
	        $( "#dialog" ).dialog({
	            autoOpen: false,
	            resizable: true,
	            width: 800,
	            show: "scale",
	            modal: true,
	            hide: "fade"
	        });
	    });
	    </script>			
	</head>
	
	<body style="font-size:50%;">
			
	<div id="wrapper">
	
		<header>
			<h1>Mesh Place</h1>
			<div id="top" class=top></div>
		</header>
			
		<nav id="nav">
	    	<p align="center"><a href="" data-filter="*">All | </a>
	    		<a href="" data-filter=".Events">Local Events | </a> 
	    		<a href="" data-filter=".Classifieds">For Sale | </a> 
	    		<a href="" data-filter=".Coupons">Local Offers | </a> 
	    		<a href="" data-filter=".Restaurants">Restaurants | </a>
	    		<a href="" data-filter=".Volunteering">Volunteering | </a> 	    		
	    		<a href="" data-filter=".RealEstate">Real Estate | </a> 
	    		<a href="" data-filter=".Contractors">Contractors</a> 
	    	</p>
	    </nav>
	</div>    
	<div id="content" class=inner>						
	</div>
	<div id="dialog" title="">
    	<div id="content2" class=inner2>						
		</div>
	</div>
	</body>
</html>